//Window abstract class.  Implementations of this class should set up a window
//for a specific rendering library (OpenGL, DirectX, etc...)

#ifndef _HELIX_WINDOW_H_
#define _HELIX_WINDOW_H_

#include "Helix.h"
#include "HObject.h"
#include "View/RenderHelper.h"

namespace helix		//Put this in the helix namespace
{

	class MY_CLASS Window : public HObject
	{
	protected:
		HINSTANCE	hInstance;	// Holds The Instance Of The Application
		HDC			hDC;		// Private GDI Device Context
		HGLRC		hRC;		// Permanent Rendering Context
		HWND		hWnd;		// Holds Our Window Handle

		bool fullScreen;		//is the window fullscreen
		int width;				//width of the window in pixels
		int height;				//height of the window in pixels
		int bpp;				//bits per pixel
		float fov;				//field of view angle
		float nearClip;			//the close clipping plane
		float farClip;			//the far clipping plane

		char *title;			//the title of the window

		bool created;			//has the window been created yet?

		RenderHelper *renderHelper;
	public:

		Window(HINSTANCE hInstance, const char* title,int width,int height,int bpp,float fov,bool fullScreen);
		virtual ~Window();
		
		bool isFullScreen();

		virtual void setFullScreen(bool fullScreen) = 0;

		virtual bool isCreated() = 0;


		virtual void initWindow() = 0;
		virtual void killWindow() = 0;

		virtual void changeWindowParams(int width,int height,float fov) = 0;

		virtual void setWindowParams(int width,int height) = 0;

		virtual void resizeScene() = 0;

		HINSTANCE getHINSTANCE()
		{
			return hInstance;
		}
		HWND HWND()
		{
			return hWnd;
		}
		HDC HDC()
		{
			return hDC;
		}

		RenderHelper* getRenderHelper()
		{
			return renderHelper;
		}
	};

}  //End the helix namespace

#endif